package org.zoomdev.zoom.validator.impl;

import org.zoomdev.zoom.validator.Validator;

import java.util.Collection;

public class RequiredCollectionValidator implements Validator {

    private final String message;

    public RequiredCollectionValidator(String message) {
        this.message = message;
    }

    @Override
    public boolean isValid(Object value) {
        return !((Collection) value).isEmpty();
    }

    @Override
    public String getMessage() {
        return null;
    }
}
